3.10.29 \(\int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx\) [929]

Optimal. Leaf size=87 \[ \frac {3 x}{8 a^2 c}+\frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {3 \cos (e+f x) \sin (e+f x)}{8 a^2 c f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c f} \]

[Out]

3/8*x/a^2/c+1/4*I*cos(f*x+e)^4/a^2/c/f+3/8*cos(f*x+e)*sin(f*x+e)/a^2/c/f+1/4*cos(f*x+e)^3*sin(f*x+e)/a^2/c/f

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.129, Rules used = {3603, 3567, 2715, 8} \begin {gather*} \frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {\sin (e+f x) \cos ^3(e+f x)}{4 a^2 c f}+\frac {3 \sin (e+f x) \cos (e+f x)}{8 a^2 c f}+\frac {3 x}{8 a^2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[1/((a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])),x]

[Out]

(3*x)/(8*a^2*c) + ((I/4)*Cos[e + f*x]^4)/(a^2*c*f) + (3*Cos[e + f*x]*Sin[e + f*x])/(8*a^2*c*f) + (Cos[e + f*x]
^3*Sin[e + f*x])/(4*a^2*c*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 3567

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[b*((d*Sec[
e + f*x])^m/(f*m)), x] + Dist[a, Int[(d*Sec[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f, m}, x] && (IntegerQ[2
*m] || NeQ[a^2 + b^2, 0])

Rule 3603

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Di
st[a^m*c^m, Int[Sec[e + f*x]^(2*m)*(c + d*Tan[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] &&
EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0] && IntegerQ[m] &&  !(IGtQ[n, 0] && (LtQ[m, 0] || GtQ[m, n]))

Rubi steps

\begin {align*} \int \frac {1}{(a+i a \tan (e+f x))^2 (c-i c \tan (e+f x))} \, dx &=\frac {\int \cos ^4(e+f x) (c-i c \tan (e+f x)) \, dx}{a^2 c^2}\\ &=\frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {\int \cos ^4(e+f x) \, dx}{a^2 c}\\ &=\frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c f}+\frac {3 \int \cos ^2(e+f x) \, dx}{4 a^2 c}\\ &=\frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {3 \cos (e+f x) \sin (e+f x)}{8 a^2 c f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c f}+\frac {3 \int 1 \, dx}{8 a^2 c}\\ &=\frac {3 x}{8 a^2 c}+\frac {i \cos ^4(e+f x)}{4 a^2 c f}+\frac {3 \cos (e+f x) \sin (e+f x)}{8 a^2 c f}+\frac {\cos ^3(e+f x) \sin (e+f x)}{4 a^2 c f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.77, size = 81, normalized size = 0.93 \begin {gather*} -\frac {-7+12 i f x+2 \cos (2 (e+f x))+3 i \sec (e+f x) \sin (3 (e+f x))+6 i \tan (e+f x)-12 f x \tan (e+f x)}{32 a^2 c f (-i+\tan (e+f x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[1/((a + I*a*Tan[e + f*x])^2*(c - I*c*Tan[e + f*x])),x]

[Out]

-1/32*(-7 + (12*I)*f*x + 2*Cos[2*(e + f*x)] + (3*I)*Sec[e + f*x]*Sin[3*(e + f*x)] + (6*I)*Tan[e + f*x] - 12*f*
x*Tan[e + f*x])/(a^2*c*f*(-I + Tan[e + f*x]))

________________________________________________________________________________________

Maple [A]
time = 0.19, size = 78, normalized size = 0.90

method result size
risch \(\frac {3 x}{8 a^{2} c}+\frac {i {\mathrm e}^{-4 i \left (f x +e \right )}}{32 a^{2} c f}+\frac {i \cos \left (2 f x +2 e \right )}{8 a^{2} c f}+\frac {\sin \left (2 f x +2 e \right )}{4 a^{2} c f}\) \(73\)
derivativedivides \(\frac {-\frac {3 i \ln \left (\tan \left (f x +e \right )-i\right )}{16}-\frac {i}{8 \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {1}{4 \tan \left (f x +e \right )-4 i}+\frac {3 i \ln \left (\tan \left (f x +e \right )+i\right )}{16}+\frac {1}{8 \tan \left (f x +e \right )+8 i}}{f \,a^{2} c}\) \(78\)
default \(\frac {-\frac {3 i \ln \left (\tan \left (f x +e \right )-i\right )}{16}-\frac {i}{8 \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {1}{4 \tan \left (f x +e \right )-4 i}+\frac {3 i \ln \left (\tan \left (f x +e \right )+i\right )}{16}+\frac {1}{8 \tan \left (f x +e \right )+8 i}}{f \,a^{2} c}\) \(78\)
norman \(\frac {\frac {3 x}{8 a c}+\frac {5 \tan \left (f x +e \right )}{8 a c f}+\frac {3 \left (\tan ^{3}\left (f x +e \right )\right )}{8 a c f}+\frac {3 x \left (\tan ^{2}\left (f x +e \right )\right )}{4 a c}+\frac {3 x \left (\tan ^{4}\left (f x +e \right )\right )}{8 a c}+\frac {i}{4 a c f}}{a \left (1+\tan ^{2}\left (f x +e \right )\right )^{2}}\) \(109\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e)),x,method=_RETURNVERBOSE)

[Out]

1/f/a^2/c*(-3/16*I*ln(tan(f*x+e)-I)-1/8*I/(tan(f*x+e)-I)^2+1/4/(tan(f*x+e)-I)+3/16*I*ln(tan(f*x+e)+I)+1/8/(tan
(f*x+e)+I))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e)),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError >> ECL says: Error executing code in Maxima: expt: undefined: 0 to a negative e
xponent.

________________________________________________________________________________________

Fricas [A]
time = 1.46, size = 61, normalized size = 0.70 \begin {gather*} \frac {{\left (12 \, f x e^{\left (4 i \, f x + 4 i \, e\right )} - 2 i \, e^{\left (6 i \, f x + 6 i \, e\right )} + 6 i \, e^{\left (2 i \, f x + 2 i \, e\right )} + i\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{32 \, a^{2} c f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e)),x, algorithm="fricas")

[Out]

1/32*(12*f*x*e^(4*I*f*x + 4*I*e) - 2*I*e^(6*I*f*x + 6*I*e) + 6*I*e^(2*I*f*x + 2*I*e) + I)*e^(-4*I*f*x - 4*I*e)
/(a^2*c*f)

________________________________________________________________________________________

Sympy [A]
time = 0.20, size = 178, normalized size = 2.05 \begin {gather*} \begin {cases} \frac {\left (- 512 i a^{4} c^{2} f^{2} e^{8 i e} e^{2 i f x} + 1536 i a^{4} c^{2} f^{2} e^{4 i e} e^{- 2 i f x} + 256 i a^{4} c^{2} f^{2} e^{2 i e} e^{- 4 i f x}\right ) e^{- 6 i e}}{8192 a^{6} c^{3} f^{3}} & \text {for}\: a^{6} c^{3} f^{3} e^{6 i e} \neq 0 \\x \left (\frac {\left (e^{6 i e} + 3 e^{4 i e} + 3 e^{2 i e} + 1\right ) e^{- 4 i e}}{8 a^{2} c} - \frac {3}{8 a^{2} c}\right ) & \text {otherwise} \end {cases} + \frac {3 x}{8 a^{2} c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))**2/(c-I*c*tan(f*x+e)),x)

[Out]

Piecewise(((-512*I*a**4*c**2*f**2*exp(8*I*e)*exp(2*I*f*x) + 1536*I*a**4*c**2*f**2*exp(4*I*e)*exp(-2*I*f*x) + 2
56*I*a**4*c**2*f**2*exp(2*I*e)*exp(-4*I*f*x))*exp(-6*I*e)/(8192*a**6*c**3*f**3), Ne(a**6*c**3*f**3*exp(6*I*e),
 0)), (x*((exp(6*I*e) + 3*exp(4*I*e) + 3*exp(2*I*e) + 1)*exp(-4*I*e)/(8*a**2*c) - 3/(8*a**2*c)), True)) + 3*x/
(8*a**2*c)

________________________________________________________________________________________

Giac [A]
time = 0.55, size = 118, normalized size = 1.36 \begin {gather*} -\frac {\frac {6 i \, \log \left (i \, \tan \left (f x + e\right ) + 1\right )}{a^{2} c} - \frac {6 i \, \log \left (i \, \tan \left (f x + e\right ) - 1\right )}{a^{2} c} + \frac {2 \, {\left (3 \, \tan \left (f x + e\right ) + 5 i\right )}}{a^{2} c {\left (-i \, \tan \left (f x + e\right ) + 1\right )}} + \frac {-9 i \, \tan \left (f x + e\right )^{2} - 26 \, \tan \left (f x + e\right ) + 21 i}{a^{2} c {\left (\tan \left (f x + e\right ) - i\right )}^{2}}}{32 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a+I*a*tan(f*x+e))^2/(c-I*c*tan(f*x+e)),x, algorithm="giac")

[Out]

-1/32*(6*I*log(I*tan(f*x + e) + 1)/(a^2*c) - 6*I*log(I*tan(f*x + e) - 1)/(a^2*c) + 2*(3*tan(f*x + e) + 5*I)/(a
^2*c*(-I*tan(f*x + e) + 1)) + (-9*I*tan(f*x + e)^2 - 26*tan(f*x + e) + 21*I)/(a^2*c*(tan(f*x + e) - I)^2))/f

________________________________________________________________________________________

Mupad [B]
time = 4.75, size = 66, normalized size = 0.76 \begin {gather*} \frac {3\,x}{8\,a^2\,c}-\frac {\frac {3\,{\mathrm {tan}\left (e+f\,x\right )}^2}{8}-\frac {\mathrm {tan}\left (e+f\,x\right )\,3{}\mathrm {i}}{8}+\frac {1}{4}}{a^2\,c\,f\,{\left (1+\mathrm {tan}\left (e+f\,x\right )\,1{}\mathrm {i}\right )}^2\,\left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/((a + a*tan(e + f*x)*1i)^2*(c - c*tan(e + f*x)*1i)),x)

[Out]

(3*x)/(8*a^2*c) - ((3*tan(e + f*x)^2)/8 - (tan(e + f*x)*3i)/8 + 1/4)/(a^2*c*f*(tan(e + f*x)*1i + 1)^2*(tan(e +
 f*x) + 1i))

________________________________________________________________________________________